﻿using System;
using System.Windows.Forms;

namespace Client
{
    public partial class IdentitySelection : Form
    {
        public IdentitySelection()
        {
            InitializeComponent();
            this.Text = "选择身份";
        }

        private void btn_Parent_Click(object sender, EventArgs e)
        {
            OpenLoginForm("父母");
        }

        private void btn_Child_Click(object sender, EventArgs e)
        {
            OpenLoginForm("子女");
        }

        private void OpenLoginForm(string identity)
        {
            // 根据身份创建一个登录窗体
            Login loginForm = new Login(identity);
            this.Hide();
            loginForm.ShowDialog();
            //this.Show();
        }

    }
}
